﻿<?php
	session_start();
	
	if($_POST['sub'])
	{
		if($_POST[check] == $_SESSION[check_pic])
		{
			echo "验证码正确！";
		}
		else
		{
			echo "验证码错误！";
		}
	}
?>

<form action = "" method = "post">
	<img src = 'img.php' /><br />
	<input type = "text" name = "check" ><br />
	<input type = "submit" name = "sub" value = "提交" /><br />
</form>